package com.zmj.service.impl;

import java.util.List;

import com.zmj.dao.IGoodsDao;
import com.zmj.dao.impl.GoodsDaoImpl;
import com.zmj.entity.Goods;
import com.zmj.entity.GoodsType;
import com.zmj.service.IGoodsService;

public class GoodsServiceImpl implements IGoodsService{

	IGoodsDao goodsDaoImpl=new GoodsDaoImpl();
	/**
	 * 根据条件查询商品列表
	 * 如果goods为空，代表查询所有商品
	 * @param goods
	 * @return
	 */
	@Override
	public List<Goods> selGoods(Goods goods) {
		return goodsDaoImpl.selGoods(goods);
	}
	
	
	/**
	 * 查询商品类别表
	 
	 * @param goods
	 * @return
	 */
	@Override
	public List<GoodsType> queryType() {
		
		return goodsDaoImpl.queryType();
	}
	/**
	 * 根据gid查询商品
	 * @param goods
	 * @return
	 */
	public Goods selOneGood(int gid) {
		return goodsDaoImpl.selOneGood(gid);
	}
}
